package com.tianhui.consignortwofei.mvp.ui.viewHolder.detail;

import android.view.ViewGroup;
import android.widget.TextView;

import com.tianhui.consignortwofei.R;
import com.tianhui.consignortwofei.mvp.model.enty.detailItem.DetailAllPriceInfo;

import org.yczbj.ycrefreshviewlib.holder.BaseViewHolder;

/**
 * @author fgs
 * @date 2020/8/28
 * @description
 **/
public class DetailAllPriceViewHolder extends BaseViewHolder<DetailAllPriceInfo> {

    private TextView tv_all_price;
    private TextView tv_yftop_price;
    private TextView tv_cctop_price;
    private TextView tv_beizhu;
    private TextView tv_siji_price;

    public DetailAllPriceViewHolder(ViewGroup parent, int res) {
        super(parent, res);
        tv_all_price = getView(R.id.tv_all_price);
        tv_yftop_price = getView(R.id.tv_yftop_price);
        tv_cctop_price = getView(R.id.tv_cctop_price);
        tv_beizhu = getView(R.id.tv_beizhu);
        tv_siji_price = getView(R.id.tv_siji_price);

    }

    @Override
    public void setData(DetailAllPriceInfo data) {
        super.setData(data);
        tv_all_price.setText(data.totalPrice);

        tv_yftop_price.setText(data.yftopPrice);
        tv_cctop_price.setText(data.cctopPrice);
        tv_beizhu.setText(data.tempcode5);
        tv_siji_price.setText(data.driverPrice);

//        allPriceInfo.driverPrice
//        if (data.lineHeight != 0) {
//            lineTextView.setHeight((int) CommonUtil.convertPixelsToDp(data.lineHeight));
//        }
//        if (data.lineColor != 0) {
//            lineTextView.setBackgroundColor(getContext().getResources().getColor(data.lineColor));
//        }


    }
}
